今天的參考
https://www.youtube.com/watch?v=W8RPE_CyTug&t=221s
今天才知道 CLASS的值 可以用空白拆成兩個(但好像也不是,因為選擇器要連著寫) LD ONE >> .LD.ONE(中間不能有空格)
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>測試</title>
<link href="C1.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="LD ONE">
<span></span>
<span></span>
</div>
<div class="LD TWO">
<span></span>
<span></span>
</div>
</div>
</body>
</html>
CSS
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
background: #EDFCFF;
}
.container{
width: 100%;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
.container .LD{
position: relative;
width: 150px;
height: 150px;
margin: 100px;
}
.container .LD.ONE span{ /*.LD.ONE 中間不能有空格*/
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
background: rgb(50, 220, 220);
border-radius: 50%;
}
.container .LD.ONE span:nth-child(2){ /*.LD.ONE 中間不能有空格*/
left: 50%;
background: rgba(50, 220, 220,0.15);
backdrop-filter: blur(10px);
}
成果
今天先這樣,明天繼續